package com.niguang.work.api.controller;


import com.baomidou.mybatisplus.plugins.Page;
import com.niguang.common.pojo.Result;
import com.niguang.work.api.entity.ReformUser;
import com.niguang.work.api.service.ReformApplyService;
import com.niguang.work.api.service.ReformUserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 'work.v_personSite' is not BASE TABLE 前端控制器
 * </p>
 *
 * @author 12380
 * @since 2018-09-06
 */
@RestController
@RequestMapping("/api/reformUser/")
public class ReformUserController {

    @Resource
    private ReformUserService reformUserService;

    /**
     * 获取通信录
     *
     * @param type 1-过滤审核人
     * @param key
     * @return
     */
    @GetMapping("getAddressBook")
    public Result getAddressBook(@RequestParam(defaultValue = "0", required = false) String type, @NotNull @RequestParam Long siteId, String key, Page page) {
        return reformUserService.getAddressBook(type, siteId, key, page);
    }

}

